package ooday1.ooday1.car;

public class car {
 String carName;//类变量
 String brand;
 int carId;
 double price;
 car(String carName,String brand,int carId,double price){//构造方法，与局部变量
     this.carName=carName;
     this.brand=brand;
     this.carId=carId;
     this.price=price;
 }
 void initiate(){
     System.out.println("一个名为"+carName+"启动了");
 }
 void show(){
     System.out.println("名为"+carName+"在展示"+"他的品牌是"+brand+"产品编号为"+carId+"价格是惊人的"+price);
 }


}
